home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.10 Oct 88 / Transfer DA Code Update / header.asm < prev    next >
Encoding:
Assembly Source File  |  1989-01-10  |  2.5 KB  |  118 lines  |  [TEXT/MPS ]

  1. ;*******************************************************************
  2. ;
  3. ;    header.asm
  4. ;
  5. ;    (c) 1987, 1988 by Clifford Story and Attic Software
  6. ;
  7. ;    assembler header for Transfer DA.
  8. ;
  9. ;*******************************************************************
  10.  
  11. ;*******************************************************************
  12. ;    includes
  13. ;*******************************************************************
  14.  
  15.     include        sysequ.d
  16.  
  17. ;*******************************************************************
  18. ;    imported routines
  19. ;*******************************************************************
  20.         
  21.     xref        open    
  22.     xref        close
  23.     xref        ctl
  24.  
  25. ;*******************************************************************
  26. ;    exported routines
  27. ;*******************************************************************
  28.         
  29.     xdef        killda
  30.     xdef        getdisk
  31.     xdef        setdisk
  32.  
  33. ;*******************************************************************
  34.  
  35.     dc.w        $3400        ; flags 
  36.     dc.w        $0000        ; service rate
  37.     dc.w        $ffff        ; event mask
  38.     dc.w        $0000        ; menuid goes here
  39.     dc.w        ornopen        ; open routine
  40.     dc.w        orndone        ; prime
  41.     dc.w        ornctl        ; control
  42.     dc.w        orndone        ; status
  43.     dc.w        ornclose    ; close
  44.  
  45. ;*******************************************************************
  46.  
  47.     dc.w        'Transfer (c) 1988, 1989 '
  48.     dc.w        'by Clifford Story and Attic Software '
  49.     dc.w        'All rights reserved'
  50.  
  51. ;*******************************************************************
  52.  
  53. ornopen    
  54.     movem.l        A0/A1,-(SP)
  55.     move.l        A1,-(SP)    ; stack device
  56.     move.l        A0,-(SP)    ; stack param            
  57.     jsr        open
  58.     bra.s        orndone
  59.  
  60. ornctl        
  61.     movem.l        A0/A1,-(SP)
  62.     move.l        A1,-(SP)    ; stack device
  63.     move.l        A0,-(SP)    ; stack param            
  64.     jsr        ctl
  65.     movem.l        (SP)+,A0/A1
  66.     move.l        jiodone,-(SP)
  67.     rts
  68.  
  69. ornclose
  70.     movem.l        A0/A1,-(SP)
  71.     move.l        A1,-(SP)    ; stack device
  72.     move.l        A0,-(SP)    ; stack param            
  73.     jsr        close
  74. ;    bra.s        orndone
  75.  
  76. orndone
  77.     movem.l        (SP)+,A0/A1
  78.     clr.l        D0
  79.     rts
  80.  
  81. ;*******************************************************************
  82. ;
  83. ;    procedure killda
  84. ;
  85. ;    (return)        address        (SP)
  86. ;    block            pointer        -4(SP)
  87. ;    device            pointer        -8(SP)
  88. ;    
  89. ;*******************************************************************
  90.  
  91. killda
  92.  
  93.     move.l        (SP)+,D0    ; return address
  94.     movea.l        (SP)+,A0    ; block
  95.     movea.l        (SP)+,A1    ; device
  96.  
  97.     move.l        D0,-(SP)
  98.     clr.l        D0
  99.     move.l        jiodone,-(SP)
  100.     rts
  101.  
  102. ;*******************************************************************
  103.  
  104. getdisk
  105.     lea        thedata,A0
  106.     move.w        (A0),4(SP)
  107.     rts
  108.  
  109. setdisk
  110.     lea        thedata,A0
  111.     move.w        4(SP),(A0)
  112.     rts
  113.  
  114. thedata
  115.     dc.w        '••'
  116.  
  117. ;*******************************************************************
  118.